# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Adding model 'Committee'
        db.create_table('protocol_committee', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=20)),
        ))
        db.send_create_signal('protocol', ['Committee'])

        # Adding model 'Institution'
        db.create_table('protocol_institution', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=80)),
        ))
        db.send_create_signal('protocol', ['Institution'])

        # Adding model 'Protocol'
        db.create_table('protocol_protocol', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
            ('date_added', self.gf('django.db.models.fields.DateField')(auto_now_add=True, blank=True)),
            ('date_updated', self.gf('django.db.models.fields.DateField')(auto_now=True, blank=True)),
            ('lab', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lab.Lab'])),
            ('institution', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['protocol.Institution'])),
            ('committee', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['protocol.Committee'])),
            ('reference_code', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('protocol_status', self.gf('django.db.models.fields.CharField')(max_length=50)),
        ))
        db.send_create_signal('protocol', ['Protocol'])


    def backwards(self, orm):
        
        # Deleting model 'Committee'
        db.delete_table('protocol_committee')

        # Deleting model 'Institution'
        db.delete_table('protocol_institution')

        # Deleting model 'Protocol'
        db.delete_table('protocol_protocol')


    models = {
        'lab.lab': {
            'Meta': {'object_name': 'Lab'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'path': ('django.db.models.fields.FilePathField', [], {'path': "'/Users/zarrar/Dropbox/sites/accession/filedb/'", 'max_length': '200', 'blank': 'True'}),
            'path_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'blank': 'True'})
        },
        'protocol.committee': {
            'Meta': {'object_name': 'Committee'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '20'})
        },
        'protocol.institution': {
            'Meta': {'object_name': 'Institution'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'})
        },
        'protocol.protocol': {
            'Meta': {'object_name': 'Protocol'},
            'committee': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['protocol.Committee']"}),
            'date_added': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'date_updated': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'institution': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['protocol.Institution']"}),
            'lab': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lab.Lab']"}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
            'protocol_status': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'reference_code': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['protocol']
